<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
<meta name="apple-touch-fullscreen" content="YES">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>{$info['title']}</title>
<link rel="stylesheet" href="/Public/enroll/css/dcjrhindex.css">
</head>
<body >
<!-------------提交失败---------------------->
<div class="uploadregstFail borderRadius" style="display:none">
    <p class="pFail"><span style="font-size:20px">！</span>提交失败</p>
</div>
<!-------------提交失败------------------------>
<!-------------提交成功---------------------->
<div class="uploadregsttel borderRadius" style="display:none">
    <p class="pFail"><span style="font-size:20px">！</span>手机号码已经注册</p>
</div>
<!-------------提交成功------------------------>
<!-------------提交成功---------------------->
<div class="uploadregstSuc borderRadius" style="display:none">
    <p class="pFail"><span style="font-size:20px">！</span>提交成功</p>
</div>
<!-------------提交成功------------------------>
<div class="container">
     <a href="#" target="_blank" class="aslides"><img src="/Public/enroll/images/slide_enroll_{$enroll}_1.jpg" alt=""></a>
    <!-- <div id="slides"> -->
        <!--<a href="#" target="_blank" class="aslides"><img src="/Public/enroll/images/1.jpg" alt=""> -->
        <!-- <a href="#" target="_blank" class="aslides"><img src="/Public/enroll/images/slide_enroll_{$enroll}_1.jpg" alt=""> -->
          <!-- <span class="titleFocus"></span>
           <p class="pFocus">1货款纠纷和思考很疯狂的精的</p>-->
       <!-- </a>  -->
       <!--<a href="#" target="_blank" class="aslides"><img src="/Public/enroll/images/2.jpg" alt=""> -->
       <!-- <a href="#" target="_blank" class="aslides"><img src="/Public/enroll/images/slide_enroll_{$enroll}_2.jpg" alt=""> -->
           <!--<span class="titleFocus"></span>
           <p class="pFocus">2货款纠纷和思考很疯狂的精的</p>-->
       <!-- </a> -->
    <!-- </div> -->
</div>
<form role="form" method="post" class="form-horizontal">
    <div class="blLIstBox">
        <ul class="blfb">
            <li class="blfb1">
            <input type="text" name="company"  data-validate="requireNotNull" id="company"  placeholder="请输入企业全称"  class="blfbInput inputcom" />
            <div class="divTips">！您还没有输入企业全称</div>
            </li>

            <li class="blfb1">
            	<input type="text" name="username" data-validate="requireNotNull" id="username" placeholder="请输入姓名"  class="blfbInput inputcom"/>
                <div class="divTips">！您还没有输入姓名</div>
                </li>
            <li class="blfb1">
            <input type="tel"  name="telephone" data-validate="requirePhone" id="telephone" placeholder="请输入联系方式"  class="blfbInput inputcom">
             <div class="divTips">！请输入正确的手机号</div>
            </li>
          
            <li class="blfb1">
                <textarea  name="introduction"  id="introduction" placeholder="请输入500字以内单位简介（选填)"  class="blfbArea"></textarea>
               
            </li>
        </ul>
        <button value="确定" id="registe" class="buttonsure" disabled/>确定提交</button>
    </div>    		
</form>
<script src="Public/enroll/js/jquery-1.10.1.min.js"></script>
<script src="Public/enroll/js/enroll.validate.js"></script>
<!-- <script src="Public/enroll/js/jquery.validate.js" type="text/javascript"></script>
<script src="Public/enroll/js/content.js"></script>
<script type="text/javascript" charset="utf-8">
	MyValidator.init();
</script> -->
<!-- <script type="text/javascript" src="Public/enroll/js/jquery.slides.js"></script>
<script type="text/javascript" src="Public/enroll/js/common.js"></script> -->
<script type="text/javascript">
var registe = function( event ){
    event.preventDefault();
	$( "#registe" ).attr( "disabled", true );
    $.ajax( {
        url: "/?m=wap&c=enrollRecord&a=registe",
        data: { enroll: "{$enroll}", username: $("#username").val(), telephone: $("#telephone").val(), company: $("#company").val(), introduction: $("#introduction").val() },
        type: "post",
        success: function( result ){
			if(result.validated!=1&&result.validated.telephone){
				$(".uploadregsttel").show();
			$(".uploadregsttel").fadeOut(2400,function(){
				$( "#registe" ).attr( "disabled",false);
			});	
			}
         else if ( result.saved!=undefined&&result.saved>0 ){            
            $(".uploadregstSuc").show();
			$(".uploadregstSuc").fadeOut(2400,function(){
				$( "#registe" ).attr( "disabled",false);
			});	
            }else{
			$(".uploadregstFail").show();
            $(".uploadregstFail").fadeOut(2400,function(){
				$( "#registe" ).attr( "disabled",false);
			});	
            }
		
        },
        error: function(){
			$( "#registe" ).attr( "disabled",false );
        }
    } );
}
var passedFunc = function(){
    $( "#registe" ).unbind( "click" ).bind( "click", registe );
    $( "#registe" ).attr( "disabled", false );
	
}

var notpassedFunc = function(){
    $( "#registe" ).attr( "disabled", true );
}
enroll.validate.init( passedFunc, notpassedFunc );

</script>
</body>
</html>
